package com.qiaodata.datatrans.utils;

/**
 * Created by Administrator on 2016/11/15 0015.
 */
public class JsonRet<T> {

    //返回json信息
    private String message;
    private T data;

    /**
     * 返回包装的信息
     * @param message
     * @return
     */
    public  static <T> JsonRet<T> getInstance(String message){
        JsonRet<T> result=new JsonRet<T>();
        result.setMessage(message);
        return result;
    }

    public static <T> JsonRet<T> getInstance(String messgae,T data){
        JsonRet<T> result=new JsonRet<T>();
        result.setData(data);
        result.setMessage(messgae);
        return result;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

}
